<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0px;
            padding: 0px;
        }
        .search {
            width: 100%;
            height: 40px;
            background-color: aqua;
            font-size: 14px;
            padding-top: 60px;
        }
        input {
            width: 330px;
            height: 32px;
            border-radius: 10px;
            border: none;
            background-color: #f5f5f5;
            padding: 0 10px;
            outline: none;
            margin: 0px 10px;
            text-align: center;
        }
        img{
            padding: 10px 0px;
            width: 360px;
            margin: 0px 10px;
        }
        h3{
            margin-left: 10px;
        }
        .sort{
            display: flex;
            justify-content: space-between;
            margin: 10px 10px;
        }
        .sort>span{
            display: inline-block;
        }
        .sort select{
            outline: none;
            border: none;
        }
        .list{
            display: flex;
            margin: 10px;
            justify-content: space-between;
        }
        .list>span{
            display: inline-block;
            font-size: 14px;
            text-align: center;
            line-height: 24px;
            padding: 6px;
            display: inline-block;
            background-color: #f5f5f5;
        }
        .list1{
            display: flex;
            padding-bottom: 70px;
        }
        .list1>img{
            width: 100px;
        }
        .list1 p{
            padding: 10px;
        }
        .list1 h3{
            margin-top: 20px;
        }

        .tabbar {
            background-color: #fff;
            position: fixed;
            bottom: 0;
            width: 100%;
            padding: 10px;
            border-top: 1px solid #ccc;
            box-sizing: border-box;
            display: flex;
            justify-content: space-around;
            text-align: center;
            line-height: 40px;
        }
    
        .tabbar div.active {
            color: coral;
        }
        .sort span.active {
            color: coral;
            width: 25%;
            background-color: #fff;
            font-size: 14px;
            text-align: center;
        }
    </style>
</head>

<body>
    <div id="app">
        <div class="search">
            <input type="text" placeholder="输入店铺、商品名称">
        </div>
        <img src="../img/2.webp" alt="">
        <h3>猜您喜欢</h3>
        <div class="sort">
            <span :class="{active: currentIndex1 == index }" @click="handleClick1(index)" v-for="(item,index) in list1"> {{ item }} </span>
        </div>
        <div class="list">
            <span v-for="(item,index) in list"> {{item}} </span>
        </div>
        <div class="list1">
            <img src="../img/1.webp" alt="">
            <div>
                <h3>金百万烤鸭</h3>
                <p>
                    <span>4.3</span><span>月销1632</span>
                </p>
                <p>
                    <span>起送￥20</span>
                    <span>远距离配送<del>￥6</del></span>
                </p>
            </div>
        </div>

        <div class="tabbar">
            <div :class="{active: currentIndex2 == index }" @click="handleClick2(index)" class="btn" v-for="(item,index) in list2">
                <div class="name">{{item.name}}</div>
            </div>
        </div>
    </div>
</body>

</html>
<script src="../vue-2.5.21.js"></script>
<script src="./01_demo.js"></script>